package com.swpu.demo.service.impl;

import com.swpu.demo.entity.SysUser;
import com.swpu.demo.mapper.SysUserMapper;
import com.swpu.demo.service.SysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author Author Name
 * @since 2021-05-12
 */
@Service
public class SysUserServiceImpl implements SysUserService {
    @Autowired
    SysUserMapper sysUserMapper;

    @Override
    public SysUser selectOneUser(String username) {
        return sysUserMapper.selectOneUser(username);
    }

    @Override
    public List<SysUser> listAllUsers() {
        return sysUserMapper.listAllUsers();
    }

    @Override
    public int addOneUser(SysUser user) {
        return sysUserMapper.addOneUser(user);
    }

    @Override
    public int updateOneUser(SysUser user) {
        return sysUserMapper.updateOneUser(user);
    }

    @Override
    public int deleteOneUser(int id) {
        return sysUserMapper.deleteOneUser(id);
    }
}
